package com.google.code.gwt.remoteaction.server;

import com.google.code.gwt.remoteaction.client.ActionExecutionService;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;

import net.sf.gilead.core.IPersistenceUtil;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class RemoteActionWithGileadModule extends AbstractModule {

  @Override
  protected void configure() {
    // Bind the RPC service implementation
    bind(ActionExecutionService.class).to(ActionExecutionServiceWithGileadSupportImpl.class);
  }

  @Provides
  @ActionExecutionLogger
  Logger provideActionExecutionLogger() {
    Logger logger = LoggerFactory.getLogger(ActionExecutionServiceWithGileadSupportImpl.class);
    return logger;
  }
  
  @Provides
  @ActionExecutionIPersistenceUtil
  protected abstract IPersistenceUtil provideActionExecutionIPersistenceUtil();
  
}
